package com.hurt.competition.player.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.hurt.competition.admin.model.Competition;
import com.hurt.competition.common.vo.PageResult;
import com.hurt.competition.judge.model.CompetitionJudge;
import com.hurt.competition.player.dto.CompetitionPlayerListRes;
import com.hurt.competition.player.dto.CompetitionPlayerReq;
import com.hurt.competition.player.dto.ScoreDataDto;
import com.hurt.competition.player.model.CompetitionJudgePlayer;
import com.hurt.competition.player.model.CompetitionPlayer;

import java.math.BigDecimal;

public interface CompetitionPlayerService extends IService<CompetitionPlayer> {

    PageResult<Competition> page(CompetitionPlayerReq req);

    PageResult<CompetitionPlayerListRes> queryList(CompetitionPlayerReq req);

    ScoreDataDto queryData(Integer competitionId);

    /**
     * 查询详情
     * @param req
     * @return
     */
    CompetitionPlayer info(CompetitionPlayerReq req);

    /**
     * 查询分数
     * @param userId
     * @param competitionId
     * @return
     */
    BigDecimal checkScore(int userId, int competitionId);

    /**
     * 报名比赛
     * @param competitionPlayer
     */
    void regisCompetition(CompetitionPlayer competitionPlayer);

    /**
     * 审批
     * @param competitionPlayer
     */
    void audit(CompetitionPlayer competitionPlayer);

    /**
     * 上传作品
     * @param competitionPlayer
     */
    void uploadProject(CompetitionPlayer competitionPlayer);
    /**
     * 打分
     * @param competitionPlayer
     */
    //void scoring(CompetitionPlayer competitionPlayer);
    //void scoring(CompetitionJudgePlayer competitionJudgePlayer, CompetitionPlayer competitionPlayer);
    //void scoring(CompetitionJudge competitionJudge, CompetitionPlayer competitionPlayer,
    //CompetitionJudgePlayer competitionJudgePlayer);
    /**
     * 校验该选手是否生效
     *
     * @param competitionJudgePlayer
     */
    void checkEnablePlayer(CompetitionPlayer competitionJudgePlayer);
    void scoring(CompetitionPlayer competitionPlayer);
}
